Multi-tasking computing systems allow a single processor to execute many different tasks. The context of a processor refers to the current process that the processor is executing, including the data stored in local memory of or for the process that is associated with the process in question. Such local memory is typically on-die with the processor, and is that which is used by the processor to execute a process. When a processor switches contexts, this means that the processor is switching from execution of one process to execution of another process.
When a processor switches contexts from a first process to a second process, the data stored in the local memory for the processor and that is associated with the first process has to be saved to other memory, typically system memory for the computing system as a whole. The data stored in the system memory that is associated with the second process is then transferred to the local memory, so that the second process can be executed by the processor appropriately. In general, the portion of the process to be executed by the processor, and the data for that portion, have to be able to fit into the local memory for the processor.
In some types of systems, a programmer is able to explicitly control the transfer of the local memory to the system memory when a processor switches contexts. However, this can place an undue burden on the programmer. For instance, typically a computer program is made up of a number of processes, that may be able to be executed in parallel on multiple processors of a given system. As a result, the programmer has to keep track of when to switch contexts, and more significantly what local memories of which processors to save or transfer back to system memory during such context switching.
For this and other reasons, therefore, there is a need for the present invention.